@echo off
echo ==========================================
echo 其他ESLint错误修复工具
echo ==========================================

cd %~dp0..

echo 正在检查其他ESLint错误...
npx eslint src/views/**/*.vue --quiet --max-warnings=0 > misc-errors.txt

echo 生成统计报告...
echo 其他ESLint错误报告 > misc-report.txt
echo 生成时间: %date% %time% >> misc-report.txt
echo ==========================================>> misc-report.txt
echo. >> misc-report.txt

echo Case语句块声明问题: >> misc-report.txt
type misc-errors.txt | findstr /C:"no-case-declarations" >> misc-report.txt
echo. >> misc-report.txt

echo v-model参数问题: >> misc-report.txt
type misc-errors.txt | findstr /C:"vue/no-v-model-argument" >> misc-report.txt
echo. >> misc-report.txt

echo 重复声明问题: >> misc-report.txt
type misc-errors.txt | findstr /C:"no-dupe" >> misc-report.txt
echo. >> misc-report.txt

echo ==========================================>> misc-report.txt
echo 修复建议: >> misc-report.txt
echo. >> misc-report.txt
echo 1. Case语句块问题: >> misc-report.txt
echo    使用花括号创建块级作用域: >> misc-report.txt
echo    case "value": { >> misc-report.txt
echo      const someVar = "value"; >> misc-report.txt
echo      // ... >> misc-report.txt
echo      break; >> misc-report.txt
echo    } >> misc-report.txt
echo. >> misc-report.txt

echo 2. v-model参数问题: >> misc-report.txt
echo    将: >> misc-report.txt
echo    <el-pagination v-model:current-page="queryParams.pageNum" ... /> >> misc-report.txt
echo    改为: >> misc-report.txt
echo    <el-pagination :current-page="queryParams.pageNum" @update:current-page="val => queryParams.pageNum = val" ... /> >> misc-report.txt
echo. >> misc-report.txt

echo 3. 重复声明问题: >> misc-report.txt
echo    合并函数实现或重命名其中一个函数 >> misc-report.txt
echo. >> misc-report.txt

echo 其他ESLint错误报告已生成: misc-report.txt
echo ==========================================

echo 运行全面检查脚本...
call %~dp0eslint-fix.bat 